package yns.springboot.guide.demo.configure;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

//指定读取特定的配置文件,注意key相同会被覆盖，spring.profiles.active的级别更高
@Component
@PropertySource(value = {"classpath:test.properties"},encoding="utf-8")
public class Configure4 {

	@Value("${db.test.name}")
	private String name;
	
	@Value("${db.test.pwd}")
	private String pwd;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

}
